<?php

use think\migration\Migrator;


class AlterConfigInsertCoupon extends Migrator
{
    public function up()
    {
        \app\model\Config::findOrCreate([
            'type'  => 'coupon',
            'name'  => '权益后台全局溢价配置费率',
            'field' => 'premium_rate',
            'value' => '0.6',
        ]);
    }

    public function down()
    {
        \app\model\Config::destroy(['type' => 'coupon', 'field' => 'premium_rate']);
    }
}
